{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import torch\n",
    "import json\n",
    "\n",
    "test_data = torch.load(\"/hpc2hdd/home/xzou428/Yuhao/HiGPT-tune-lightning/dataset/NLP_rw_new_batch/instruction/test_data_list_1500_8192_ans_gt_256_llama3.pt\")\n",
    "\n",
    "test_ids = [data['id'] for data in test_data]\n",
    "\n",
    "with open('/hpc2hdd/home/xzou428/Yuhao/HiGPT-tune-lightning/dataset/NLP_rw_new_batch/instruction/test_ids_1500_8192_ans_gt_256_llama3.json', 'w') as f:\n",
    "    json.dump(test_ids, f)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3.10.14 ('yuh')",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.14"
  },
  "orig_nbformat": 4,
  "vscode": {
   "interpreter": {
    "hash": "92619f85c62eb73280c07ca2268c8e47b90999a589aa097a1a08a504bd2fb2c6"
   }
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
